package com.gxm.模式.代理.静态;

public class UserDaoProxy implements IUserDao {
    private IUserDao target;

    public UserDaoProxy(IUserDao iuserDao) {
        this.target = iuserDao;
    }

    @Override
    public void add() {
        System.out.println("开启事物...");
        target.add();
        System.out.println("关闭事物...");
    }
}
